Skip to content

Devx 73 http trace headers#31

Merged
wcole1-godaddy merged 3 commits intogodaddy:mainfrom
asingh9-godaddy:DEVX-73-http-trace-headers
May 4, 2026
Merged

Devx 73 http trace headers#31
wcole1-godaddy merged 3 commits intogodaddy:mainfrom
asingh9-godaddy:DEVX-73-http-trace-headers

Conversation

@asingh9-godaddy
Copy link
Copy Markdown
Contributor

What-
Adds a shared User-Agent (godaddy-cli/ from the package manifest) and a per-request x-request-id (UUID v7) on outbound calls: REST (apiRequestEffect), GraphQL (getRequestHeaders), OAuth token exchange, and webhook event-types. Centralized in src/shared/cli-trace.ts with lowercase header keys to match existing REST behavior. Presigned S3 PUTs are unchanged (signed headers only).

Why-
Improves server-side traceability in logs (e.g. Kibana) by consistently identifying the CLI and correlating individual requests.

How to verify-
pnpm exec tsc --noEmit
pnpm run build
pnpm vitest run

Changelog-
minor, see -.changeset/cli-http-trace-headers.md

Introduce cliTraceHeaders() with godaddy-cli/<packageVersion> and a fresh
UUID v7 request id. Wire into GraphQL getRequestHeaders, REST
ensureRequiredRequestHeaders, OAuth token exchange, and webhook event-types
fetch. Document why presigned S3 PUT keeps only signed headers.
Move CLI_USER_AGENT and cliTraceHeaders to src/shared/cli-trace.ts so core,
services, and webhook code depend on a neutral layer instead of core importing
services. Use lowercase `user-agent` and `x-request-id` keys everywhere to
match ensureRequiredRequestHeaders in core/api.ts. Relocate unit tests
alongside the shared module.
@wcole1-godaddy wcole1-godaddy merged commit ebac8a1 into godaddy:main May 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants